<template>
  <div class="page-container">
    <div class="page-container__inner">
      <div v-if="$slots.header" class="page-container__header">
        <slot name="header"></slot>
      </div>
      <div v-if="$slots.toolbar" class="page-container__toolbar">
        <slot name="toolbar"></slot>
      </div>
      <div v-if="$slots.content" class="page-container__content">
        <slot name="content"></slot>
      </div>
      <slot />
    </div>
  </div>
</template>

<style scoped>
.page-container {
  width: calc(100% - 20px);
  height: calc(100vh - 109px);
  box-sizing: border-box;
  background-color: #fff;
  overflow: hidden;
  margin: 10px 1px 10px 10px;
}

.page-container__inner {
  padding: 10px;
}

.page-container__header,
.page-container__toolbar,
.page-container__table,
.page-container__content {
  margin-bottom: 20px;
}

.page-container__header {
  margin-bottom: 15px;
}

.page-container__toolbar {
  margin-bottom: 15px;
}

.page-container__content {
  flex: 1;
}

.page-container__table {
  margin-top: 20px;
}
</style>
